const express = require(`express`);
const path = require(`path`)
const app = express();

const bodyParser = require(`body-parser`)

app.listen(9527, () => {
    console.log(95273521)


})

app.use(`/pubulic`, express.static(path.join(__dirname, `pubulic`)))
app.use(bodyParser.urlencoded({ extended: false }))

app.use(bodyParser.json())


// app.use((req, res) => {
//     res.setHeader('Content-Type', 'text/plain')
//     res.write('you posted:\n')
//     res.end(JSON.stringify(req.body, null, 2))
// })




app.post(`/home`, (req, res) => {

    res.send("135154")

    console.log(req.body)

})

app.get(`/news`, (req, res) => {
    res.send(" I AM ROUTES")

    console.log(req.query)

})

// app.get(`/pubulic`, (req, res) => {
//     res.send("99999999999999")
// })